import Vue from 'vue'
// 直接将Vue组件作为Vue.extend的参数
import popFilePreview from "./popFilePreview";
import store from "@/store";
import router from "@/router"

const showPopFilePreview = (P_File) => {
    const popEventConstructor = Vue.extend(popFilePreview);
    const instance = new popEventConstructor({
        el: document.createElement("div"),
        store,
        router
    });

    document.querySelector("body").appendChild(instance.$el);
    return instance.show(P_File);
}

export default showPopFilePreview;